package com.ruoyi.a2.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.a2.mapper.AdsDynamicsInfoMapper;
import com.ruoyi.a2.domain.AdsDynamicsInfo;
import com.ruoyi.a2.service.IAdsDynamicsInfoService;

/**
 * ADS-B动态信息Service业务层处理
 *
 * @author ruoyi
 * @date 2025-02-20
 */
@Service
public class AdsDynamicsInfoServiceImpl extends ServiceImpl<AdsDynamicsInfoMapper, AdsDynamicsInfo> implements IAdsDynamicsInfoService
{
    @Autowired
    private AdsDynamicsInfoMapper adsDynamicsInfoMapper;

    /**
     * 查询ADS-B动态信息
     *
     * @param id ADS-B动态信息主键
     * @return ADS-B动态信息
     */
    @Override
    public AdsDynamicsInfo selectAdsDynamicsInfoById(Long id)
    {
        return adsDynamicsInfoMapper.selectAdsDynamicsInfoById(id);
    }

    /**
     * 查询ADS-B动态信息列表
     *
     * @param adsDynamicsInfo ADS-B动态信息
     * @return ADS-B动态信息
     */
    @Override
    public List<AdsDynamicsInfo> selectAdsDynamicsInfoList(AdsDynamicsInfo adsDynamicsInfo)
    {
        return adsDynamicsInfoMapper.selectAdsDynamicsInfoList(adsDynamicsInfo);
    }

    /**
     * 新增ADS-B动态信息
     *
     * @param adsDynamicsInfo ADS-B动态信息
     * @return 结果
     */
    @Override
    public int insertAdsDynamicsInfo(AdsDynamicsInfo adsDynamicsInfo)
    {
        adsDynamicsInfo.setCreateTime(DateUtils.getNowDate());
        return adsDynamicsInfoMapper.insertAdsDynamicsInfo(adsDynamicsInfo);
    }

    /**
     * 修改ADS-B动态信息
     *
     * @param adsDynamicsInfo ADS-B动态信息
     * @return 结果
     */
    @Override
    public int updateAdsDynamicsInfo(AdsDynamicsInfo adsDynamicsInfo)
    {
        adsDynamicsInfo.setUpdateTime(DateUtils.getNowDate());
        return adsDynamicsInfoMapper.updateAdsDynamicsInfo(adsDynamicsInfo);
    }

    /**
     * 批量删除ADS-B动态信息
     *
     * @param ids 需要删除的ADS-B动态信息主键
     * @return 结果
     */
    @Override
    public int deleteAdsDynamicsInfoByIds(Long[] ids)
    {
        return adsDynamicsInfoMapper.deleteAdsDynamicsInfoByIds(ids);
    }

    /**
     * 删除ADS-B动态信息信息
     *
     * @param id ADS-B动态信息主键
     * @return 结果
     */
    @Override
    public int deleteAdsDynamicsInfoById(Long id)
    {
        return adsDynamicsInfoMapper.deleteAdsDynamicsInfoById(id);
    }
}
